<template>
    <p>
        <button v-show="item.num> 0" @click="prev(item.num,item.id)">-</button>
        <span>{{item.num}}</span>
        <button @click="next(item.num,item.id)">+</button>
    </p>
</template>

<script>
export default {
    data(){
        return {

        }
    },
    props:["item","Ind"],
    methods:{
        next(item,id){
           let num =  item.num
           num++
            this.$emit("next",{num,id})
        },
        prev(item,id){
            let num =  item.num
           num--
            this.$emit("prev",{num,id})
        }
    }
}
</script>

<style>


</style>
